// main.cpp
// Heihaier <admin@heihaier.org>
// http://www.heihaier.org

#include "main.h"
#include "FetionWindow.h"
#include "FetionLoginBox.h"

int main(int argc, char * argv[])
{
	fx_init();
	Gtk::Main kit(argc, argv);

	FetionWindow * pFetionWindow = new FetionWindow;

	Gtk::Main::run(*pFetionWindow);

	delete pFetionWindow;

	fx_terminate();

	return 0;
}

void on_login_msg(int message, WPARAM wParam, LPARAM lParam, void * args)
{
	FetionLoginBox * pFetionLoginBox = (FetionLoginBox*)args;
	if(!pFetionLoginBox)
	  return;

	pFetionLoginBox->signal_login_msg.emit(message, wParam, lParam);
}

void on_system_msg(int message, WPARAM wParam, LPARAM lParam, void * args)
{
	FetionWindow * pFetionWindow = (FetionWindow*)args;
	if(!pFetionWindow)
	  return;

	pFetionWindow->signal_system_msg.emit(message, wParam, lParam);
}

